package com.heu.blood.globalExceptionHandler;

import com.heu.blood.globalExceptionHandler.BaseErrorInfoInterface;

/**
 * 功能描述：全局异常
 *
 * @Author: lvyj
 * @Date: 2024/6/29 14:17
 */
public class MyException extends RuntimeException{
    private static final long serialVersionUID = 1L;

    /**
     * 返回的结果码
     */
    protected String resultCode;

    /**
     * 返回的标准信息
     */
    protected String resultMsg;

    public MyException(BaseErrorInfoInterface errorInfoInterface){
        super(errorInfoInterface.getResultCode());
        this.resultCode = errorInfoInterface.getResultCode();
        this.resultMsg = errorInfoInterface.getResultMsg();
    }

    public String getResultCode(){
        return this.resultCode;
    }
    public String getResultMsg(){
        return this.resultMsg;
    }
}
